package com.thwj.project.push.domain;

    import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thwj.common.annotation.Excel;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

;

/**
 * 微信订阅消息操作记录对象 wx_push_message
 *
 * @author generate
 * @date 2023-06-10
 */

@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("wx_push_message")
public class WxPushMessage extends Model<WxPushMessage>{
private static final long serialVersionUID=1L;

    /** 主键 */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 订阅消息模板id */
            @Excel(name = "订阅消息模板id")
    private String templateCode;

    /** 订阅消息模板 */
            @Excel(name = "订阅消息模板")
    private String templateName;

    /** 用户id */
            @Excel(name = "用户id")
    private Long userId;

    /** 用户openid */
            @Excel(name = "用户openid")
    private String openid;

    /** 内容 */
            @Excel(name = "内容")
    private String data;

    /** 消息是否发送成功 */
            @Excel(name = "消息是否发送成功")
    private Boolean pushSuccess;

    /** 异常内容 */
            @Excel(name = "异常内容")
    private String exceptionMessage;

    /** 创建时间 */
            @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
            @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;




    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
